// gl_test.cpp 
//

#include "stdafx.h"

#include <CxPort\CxTcpService.hpp>
#include <CxPort\CxSerialPort.hpp>
//
//void RenderScene()
//{
//	::glClear(GL_COLOR_BUFFER_BIT);
//	::glFlush();
//}
//
//void SetupRC()
//{
//	::glClearColor(0.05f,0.0f,0.0f,1.0f);
//}


int _tmain(int argc, _TCHAR* argv[])
{
	
	//::glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
	//::glutCreateWindow("MyWindow");
	//::glutDisplayFunc(RenderScene);
	//SetupRC();
	//glutMainLoop();
	//	

	CxSerialPort port("COM1");

	while(1)
	{
		boost::this_thread::sleep(boost::posix_time::seconds(1));
		char buffer[]={0x05,0x59,0xf8,0xed,'O','K'};

		port.sync_write((unsigned char*)buffer,sizeof(buffer));
	}

	boost::this_thread::sleep(boost::posix_time::seconds(0xffff));

	return 0;
}

